Global Index
HTML5 JS API Index > Indexed DB Tutorials & Specs

IDBDatabase

Extends EventTarget.

Properties
DOMString
name
On getting, this attribute MUST return the name of the connected database. The function MUST return this name even if the closePending flag is set on the connection. In other words, the return value from this function stays constant for the lifetime of the IDBDatabase instance.
DOMStringList
objectStoreNames
On getting, this attribute MUST return a list of names of the object stores currently in the connected database. The list MUST be sorted in ascending order using the algorithm defined by step 4 of section 11.8.5, The Abstract Relational Comparison Algorithm of the ECMAScript Language Specification [ECMA-262].
EventHandler
onabort
The event handler for the abort event.
EventHandler
onerror
The event handler for the error event.
EventHandler
onversionchange
The event handler for the versionchange event.
unsigned long long
version
On getting, this attribute MUST return the version of the database when this IDBDatabase instance was created. When a IDBDatabase instance is created, this is always the number passed as the version argument passed to the open call used to create the IDBDatabase instance.
Operations
void
close()
This method returns immediately and performs the steps for closing a database connection. No parameters.Return type: void
IDBObjectStore
createObjectStore(DOMString name, optional IDBObjectStoreParameters optionalParameters)
This method creates and returns a new object store with the given name in the connected database. Note that this method must only be called from within a "versionchange" transaction.
void
deleteObjectStore(DOMString name)
This method destroys the object store with the given name in the connected database. Note that this method must only be called from within a "versionchange" transaction.
IDBTransaction
transaction((DOMString or sequence<DOMString>) storeNames, optional IDBTransactionMode mode)
If the value for the mode parameter is not "readonly" or "readwrite", the implementation MUST throw a TypeError. If this method is called on IDBDatabase object for which a "versionchange" transaction is still running, the implementation MUST throw a DOMException of type InvalidStateError.
Referenced by
IDBTransactiondb